import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.*
{{imports}}
{{#repositories.length}}
val bs = buildScript {
    repos({{{repositories}}})
}
{{/repositories.length}}
{{#properties}}
val {{first}} = "{{second}}"
{{/properties}}

val p = {{directive}} {
    name = "{{name}}"
    group = "{{group}}"
    artifactId = name
    version = "{{version}}"
{{#sourceDirectories.length}}
    sourceDirectories {
        {{#sourceDirectories}}
        path("{{toString}}")
        {{/sourceDirectories}}
    }
{{/sourceDirectories.length}}
{{#sourceDirectoriesTest.length}}
    sourceDirectoriesTest {
        {{#sourceDirectoriesTest}}
        path("{{toString}}")
        {{/sourceDirectoriesTest}}
    }
{{/sourceDirectoriesTest.length}}

    dependencies {
//        compile("com.beust:jcommander:1.68")
        {{#mainDependencies}}
        compile("{{groupId}}:{{artifactId}}:{{version}}")
        {{/mainDependencies}}
    }

    dependenciesTest {
        compile("org.testng:testng:6.11")
        {{#testDependencies}}
        compile("{{groupId}}:{{artifactId}}:{{version}}")
        {{/testDependencies}}
    }

    assemble {
        jar {
        }
    }

    application {
        mainClass = "com.example.{{mainClass}}"
    }
}
